package com.glory.good_dark.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author yi.zhang
 * @date 2019/6/20
 * @desc 数据处理工具类
 */
public class DateUtils {

    public static String getSTATUSDESC(String status)
    {
        String statusDesc = "";
        switch (status)
        {
            case "NotStart":
                statusDesc = "未开始";
                break;
            case "Start":
                statusDesc = "开始维修";
                break;
            case "Completed":
                statusDesc = "维修完成";
                break;
            case "Approved":
                statusDesc = "验收完成";
                break;
        }
        return  statusDesc;
    }

    //获取年月
    public static String getNowDate(String format) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);
        String date = simpleDateFormat.format(new Date());
        return date;
    }
}
